package com.paper.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.paper.entity.Paper;
@Repository
public interface PaperRepository extends PagingAndSortingRepository<Paper, Long>, JpaSpecificationExecutor<Paper> {
	@Query(value="from Paper p where p.subject.id=?1")
	public List<Paper> findBySubjectId(Long id);
}
